/*
 ============================================================================
 Name        : hev-config.h
 Author      : Heiher <admin@heiher.info>
 Version     : 0.0.2
 Copyright   : Copyright (c) 2010 everyone.
 Description : Linkage 802.1x for Unix-like operating system.
 ============================================================================
 */

#ifndef __HEV_CONFIG_H__
#define __HEV_CONFIG_H__

#include <gio/gio.h>

G_BEGIN_DECLS

#define HEV_TYPE_CONFIG	(hev_config_get_type())
#define HEV_CONFIG(obj)	(G_TYPE_CHECK_INSTANCE_CAST((obj), HEV_TYPE_CONFIG, HevConfig))
#define HEV_IS_CONFIG(obj)	(G_TYPE_CHECK_INSTANCE_TYPE((obj), HEV_TYPE_CONFIG))
#define HEV_CONFIG_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST((klass), HEV_TYPE_CONFIG, HevConfigClass))
#define HEV_IS_CONFIG_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE((klass), HEV_TYPE_CONFIG))
#define HEV_CONFIG_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS((obj), HEV_TYPE_CONFIG, HevConfigClass))

typedef struct _HevConfig HevConfig;
typedef struct _HevConfigClass HevConfigClass;

struct _HevConfig
{
	GObject parent_instance;
};

struct _HevConfigClass
{
	GObjectClass parent_class;
};

GType hev_config_get_type(void);

GObject * hev_config_new(GCancellable * cancellable, GError ** error);

gboolean hev_config_get_general_autoretry(HevConfig * self);
gint hev_config_get_general_retrynumber(HevConfig * self);
gchar * hev_config_get_general_interface(HevConfig * self);
gchar * hev_config_get_account_name(HevConfig * self);
gchar * hev_config_get_account_passwd(HevConfig * self);

void hev_config_set_general_autoretry(HevConfig * self, gboolean retry);
void hev_config_set_general_retrynumber(HevConfig * self, gint number);
void hev_config_set_general_interface(HevConfig * self, const gchar * name);
void hev_config_set_account_name(HevConfig * self, const gchar * name);
void hev_config_set_account_passwd(HevConfig * self, const gchar * passwd);

G_END_DECLS

#endif /* __HEV_CONFIG_H__ */

